package cn.sdjzu.exercise;

import java.util.LinkedList;
import java.util.List;
import android.app.Activity;
import android.app.Application;
public class ExerciseApp extends Application {
	
	public String currentCardNo;
	public String mPushTime;
	public String mHoldTime;
	public String mResetTime;
	public String mSleepTime;
    public boolean isMove;  // 曲线移动
    public int mGroupCnt = 5; //组数
    public int mTimeCnt =4; // 每组的 次数
    public int mGroupSpaceTime = 60;  //每组之间的间隔
    public int mOneTotalTime = 300;   //一次的总时间。
    
	private  List<Activity> activityList = new LinkedList<Activity>();
	private static ExerciseApp instance;

	// 单例模式中获取唯一的ExerciseApp实例
	public static ExerciseApp getInstance() {
		if (null == instance) {
			instance = new ExerciseApp();
		}
		return instance;
	}

	// 添加Activity到容器中
	public void addActivity(Activity activity) {
		activityList.add(activity);
	}

	// 遍历所有Activity并finish
	public void exit() {
		for (Activity activity : activityList) {
			activity.finish();
		}
		System.exit(0);
	}
}
